home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Selection
- BackColor = &H00808080&
- Caption = "PFF for Windows"
- ClientHeight = 3990
- ClientLeft = 1005
- ClientTop = 1470
- ClientWidth = 4485
- FillStyle = 3 'Vertical Line
- ForeColor = &H00000000&
- Height = 4395
- Icon = PFFSEL.FRX:0000
- Left = 945
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 3990
- ScaleWidth = 4485
- Top = 1125
- Width = 4605
- Begin CommandButton AllDone
- BackColor = &H00808080&
- Caption = "E&xit"
- Height = 375
- Left = 3120
- TabIndex = 7
- Top = 3480
- Width = 1095
- End
- Begin CommandButton PrintFile
- BackColor = &H00808080&
- Caption = "&Print File"
- Height = 375
- Left = 240
- TabIndex = 6
- Top = 3480
- Width = 1095
- End
- Begin PictureBox Picture1
- BackColor = &H00000000&
- Enabled = 0 'False
- Height = 510
- Left = 1425
- Picture = PFFSEL.FRX:0302
- ScaleHeight = 480
- ScaleWidth = 495
- TabIndex = 9
- Top = 3345
- Width = 525
- End
- Begin CheckBox LineNum
- BackColor = &H00808080&
- Caption = "Line &Numbers"
- ForeColor = &H0000FF00&
- Height = 255
- Left = 1470
- TabIndex = 3
- Top = 3045
- Value = 1 'Checked
- Width = 1530
- End
- Begin CommandButton FileEdit
- BackColor = &H00808080&
- Caption = "&Edit File"
- Height = 375
- Left = 3120
- TabIndex = 8
- Top = 3000
- Width = 1095
- End
- Begin CommandButton ViewFile
- BackColor = &H00808080&
- Caption = "&View File"
- Height = 375
- Left = 240
- TabIndex = 5
- Top = 3000
- Width = 1095
- End
- Begin DriveListBox Drive1
- BackColor = &H00FFFFFF&
- ForeColor = &H00000000&
- Height = 315
- Left = 240
- TabIndex = 1
- Top = 2565
- Width = 3975
- End
- Begin FileListBox File1
- BackColor = &H00FFFFFF&
- ForeColor = &H00000000&
- Height = 1980
- Left = 2520
- TabIndex = 4
- Top = 495
- Width = 1695
- End
- Begin TextBox CurrentFile
- BackColor = &H00FFFFFF&
- ForeColor = &H00000000&
- Height = 315
- Left = 2520
- MousePointer = 3 'I-Beam
- TabIndex = 2
- Text = "*.*"
- Top = 120
- Width = 1695
- End
- Begin DirListBox Dir1
- BackColor = &H00FFFFFF&
- Height = 2355
- Left = 240
- TabIndex = 0
- Top = 120
- Width = 2175
- End
- Begin Label Label1
- BackColor = &H00808080&
- Caption = "AmSoft Development"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00C0C000&
- Height = 435
- Left = 2040
- TabIndex = 10
- Top = 3465
- Width = 1035
- End
- Sub AllDone_Click ()
- If nCid% <> 0 Then Result% = CloseComm(nCid%)
- End
- End Sub
- ' This sub works well only with VGA displays. For EGA
- ' displays, you will want to modify the backcolor
- ' properties for the form and controls, and avoid this
- ' procedure.
- Sub BorderBox (Source As Control, Action As Integer)
- BLeft% = Source.Left - 20 ' Get coordinates
- BTop% = Source.Top - 20
- BWide% = Source.Width + 18
- BHigh% = Source.Height + 18
- ' Action TRUE means draw, FALSE means erase
- If Action Then
- ' Draw a recessed border around Source control
- Line (BLeft%, BTop%)-Step(BWide%, 0), 0
- Line -Step(0, BHigh%), RGB(255, 255, 255)
- Line -Step(-BWide%, 0), RGB(255, 255, 255)
- Line -Step(0, -BHigh%), 0
- Else
- ' Erase border around Source control
- Line (BLeft%, BTop%)-Step(BWide%, 0), Backcolor
- Line -Step(0, BHigh%), Backcolor
- Line -Step(-BWide%, 0), Backcolor
- Line -Step(0, -BHigh%), Backcolor
- End If
- End Sub
- Sub CurrentFile_KeyPress (KeyAscii As Integer)
- On Error GoTo GetError
- If KeyAscii = 13 Then
- File1.FileName = CurrentFile.Text
- End If
- On Error GoTo 0
- Exit Sub
- GetError:
- If Err > 0 Then
- CurrentFile.Text = "*.txt, *.bat, *.me"
- File1.FileName = CurrentFile.Text
- End If
- Resume Next
- End Sub
- Sub Dir1_Change ()
- File1.Path = Dir1.Path
- ' File1.SetFocus
- If File1.ListCount Then File1.ListIndex = 0
- ChDir File1.Path
- End Sub
- Sub Dir1_Click ()
- lastchange = DIRSBOXCLICK
- File1.FileName = "*.TXT;*.ME;*.1ST;*.BAT"
- End Sub
- Sub Drive1_Change ()
- Dir1.Path = Drive1.Drive
- End Sub
- Sub File1_Click ()
- lastchange = FILEBOXCLICK
- CurrentFile.Text = File1.FileName
- End Sub
- Sub File1_DblClick ()
- CurrentFile.Text = File1.FileName
- ViewFile_Click
- 'ViewFile.SetFocus
- End Sub
- Sub FileEdit_Click ()
- If File1.FileName = "" Then
- Beep
- MsgBox "No file specified.", 64, "I Need a File"
- Exit Sub
- End If
- ChDrive Drive1.Drive
- ChDir File1.Path
- x = Shell("notepad.exe " + CurrentFile.Text, 1)
- End Sub
- Sub Form_Load ()
- Show
- ViewFile.SetFocus
- CurrentFile.Text = "*.TXT;*.ME;*.1ST;*.BAT"
- File1.FileName = "*.TXT;*.ME;*.1ST;*.BAT"
- BorderBox CurrentFile, True
- BorderBox Drive1, True
- BorderBox Dir1, True
- BorderBox File1, True
- BorderBox Picture1, True
- End Sub
- Sub Form_Paint ()
- BorderBox CurrentFile, True
- BorderBox Drive1, True
- BorderBox Dir1, True
- BorderBox File1, True
- BorderBox Picture1, True
- End Sub
- Sub Form_Unload (Cancel As Integer)
- End
- End Sub
- Sub LineNum_Click ()
- If LineNum.Value = 1 Then
- Lines = True
- Else
- Lines = False
- End If
- End Sub
- Sub PrintFile_Click ()
- ChDrive Drive1.Drive
- ChDir File1.Path
- MyFile$ = File1.FileName
- Selection.MousePointer = 11
- FormatFile MyFile$
- Selection.MousePointer = 0
- End Sub
- Sub SetDraft_Click ()
- LineNum.Enabled = 0 ' Grey the line number choice
- PRETTYPRINT = False
- End Sub
- Sub SetPretty_Click ()
- PRETTYPRINT = True
- LineNum.Enabled = 1
- End Sub
- Sub ViewFile_Click ()
- If File1.FileName = "" Then
- Beep
- MsgBox "No file specified.", 64, "I Need a File"
- Exit Sub
- End If
- Selection.Hide
- Viewer.Show MODAL
- Selection.Show
- End Sub
-